import http from '@/utils/request'

// 提交订单
export const submitOrderApi = (data) => http.post('/orders/submit', data)

// 支付订单
export const payOrderApi = (data) => http.post('/orders/pay', data)

// 查询订单列表 
export const getOrderListApi =  (params) => http.get('/orders/page', { params })

// 查询订单详情
export const getOrderDetailApi = (orderNo)=> http.get(`/orders/${orderNo}`)

// 取消订单
export const cancelOrderApi = (data)=> http.put('/orders/cancel' , data)

// 确认收货
export const completeOrderApi = (id)=> http.put(`/orders/complete/${id}`)